<template>
  <div class="friend-link sec-card">
    <div class="friend-link-desc section-header">
      🥂 推广
    </div>
    <ul class="link-list">
      <li v-for="(item, index) in list" :key="index" class="link-content">
        <a :href="item.link" target="_blank">{{ item.title }}</a>
      </li>
    </ul>
  </div>
</template>

<script>
import { getList } from '@/api/promote'

export default {
  name: 'Promotion',
  data() {
    return {
      list: []
    }
  },
  created() {
    this.fetchList()
  },
  methods: {
    fetchList() {
      getList().then((response) => {
        const { data } = response
        this.list = data
      })
    }
  }
}
</script>

<style scoped>
.link-list{
  padding: 8px;
}
.link-content{
  padding: 8px;
  font-size: 14px;
}
</style>
